package com.xxl.job.executor.mvc.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.xxl.job.executor.mvc.bean.JobInfo;
import com.xxl.job.executor.mvc.service.JobInfoService;

@Controller
@EnableAutoConfiguration
public class IndexController {
	
	@Autowired
	private JobInfoService jobInfoService;

    @RequestMapping("/")
    @ResponseBody
    List<JobInfo> index() {
        return jobInfoService.findList();
    }

}